<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'></script>
<script src='./jquery.cells.js'></script>
<link type="text/css" rel="stylesheet" href="./jquery.cells.css">
<script type="text/javascript">
$(document).ready(function(){
    $('#myTimetable').cells({
        data:[
            {
                column:3,
                row:4,
                title:'我是title',
                desc:'GoGo 我是內容'
            },
            {
                column:2,
                row:3,
                title:'按我按我',
                desc:'幹麻真的按我?'
            }
        ],
        onEventClicked: function (event) {
        	alert('this.id:' + $(this).parent().attr('id'));
        	
        }

    });
    

});

function addEvent(){
    var newData = {
                column:4,
                row:2,
                title:'額外加進來的data',
                desc:'我是額外加入的data'
            };
    $('#myTimetable').cells('addEvent', newData);
}
</script>
</head>
<body>

下面的是時間表<input type="button" onclick="addEvent()" value='按我'>
<div id='myTimetable'></div>
</body>
</html>